 /**********************************************************************
 * Fichier : DriverCore.h
 *
 * Résumé : Fichier d'en-tête qui déclare les fonctions "coeur"
 *          (internes) du module ainsi que ses structures personnelles.
 *
 * Auteur : Vincent Léger
 *
 * Dernière modification : Lundi 5 novembre 2012
 *
 **********************************************************************/

#ifndef _DRIVERCORE_H_
#define _DRIVERCORE_H_

 /******************************************
 *********DÉCLARATION DE LIBRAIRIES*********
 ******************************************/
#include "KernelLibz.h"         //librairies du kernel linux
#include "DebugMacros.h"        //macros pour debogage
#include "DriverDefinitions.h"  //définition des

 /******************************************
 **********STRUCTURES PERSONNELLES**********
 ******************************************/
struct BufferStruct {
    unsigned int    InIdx;
    unsigned int    OutIdx;
    unsigned short  BufFull;
    unsigned short  BufEmpty;
    unsigned int    BufSize;
    unsigned char   *Buffer;
};
//structure dev personnelle
struct DriverDev {
    unsigned char       *ReadBuf;
    unsigned char       *WriteBuf;
    struct semaphore    SemBuf;
    spinlock_t          DriverAccess;
    unsigned short      numWriter;
    unsigned short      numReader;
    dev_t               dev;
    struct cdev         cdev;
    //struct semaphore    SemRead;
    //struct semaphore    SemWrite;
};

 /******************************************
 *********DÉCLARATION DE FONCTIONS**********
 ******************************************/


#endif  //_DRIVERCORE_H_

